import { Layout } from '@fl/utils/routerHelper'

const orderManagement = {
    children: [
        {
            component: () => import('@/purchase-pages/order-management/protocol-management/index.vue'),
            meta: {
                title: '协议管理',
            },
            name: 'purchase-protocol-management',
            path: 'purchase-protocol-management',
        },
        {
            component: () => import('@/supplier-pages/order-management/protocol-management/detail.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-protocol-management',
                hidden: true,
                noTagsView: true,
                title: '协议管理详情',
            },
            name: 'purchase-protocol-management-show',
            path: 'purchase-protocol-management/:id',
        },
        {
            component: () => import('@/pages/product-preview/index.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-protocol-management',
                hidden: true,
                // noTagsView: true,
                title: '产品预览',
            },
            name: 'purchase-product-preview',
            path: 'purchase-product-preview',
        },
        {
            component: () => import('@/purchase-pages/order-management/protocol-management/component/add.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-protocol-management',
                hidden: true,
                noTagsView: true,
                title: '下单',
            },
            name: 'purchase-protocol-add',
            path: 'purchase-protocol-add/:id',
        },
        {
            component: () => import('@/purchase-pages/order-management/protocol-management/component/attachments-order.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-protocol-management',
                hidden: true,
                noTagsView: true,
                title: '清单附件下单信息',
            },
            name: 'attachments-order',
            path: 'attachments-order',
        },
        {
            component: () => import('@/purchase-pages/order-management/protocol-management/component/direct-order.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-protocol-management',
                hidden: true,
                noTagsView: true,
                title: '直接下单',
            },
            name: 'direct-order',
            path: 'direct-order',
        },
        {
            component: () => import('@/purchase-pages/order-management/sales-order/index.vue'),
            meta: {
                title: '销售订单',
            },
            name: 'purchase-sales-order',
            path: 'purchase-sales-order',
        },
        {
            component: () => import('@/purchase-pages/order-management/sales-order/show.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-sales-order',
                hidden: true,
                noTagsView: true,
                title: '订单详情',
            },
            name: 'purchase-sales-order-show',
            path: 'purchase-sales-order/:id',
        },
        {
            component: () => import('@/purchase-pages/order-management/sales-order/component/edit.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-sales-order',
                hidden: true,
                noTagsView: true,
                title: '修改订单',
            },
            name: 'edit-order',
            path: 'edit-order',
        },
        {
            component: () => import('@/purchase-pages/order-management/sales-order/component/edit-list-info.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-sales-order',
                hidden: true,
                noTagsView: true,
                title: '修改订单明细',
            },
            name: 'edit-order-info',
            path: 'edit-order-info',
        },
        {
            // 复用供应端页面
            component: () => import('@/supplier-pages/order-management/sales-order/component/log.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-sales-order',
                hidden: true,
                noTagsView: true,
                title: '操作日志',
            },
            name: 'purchase-sales-order-log',
            path: 'purchase-sales-order-log',
        },
        {
            component: () => import('@/purchase-pages/order-management/sales-order/component/view.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/purchase-sales-order',
                hidden: true,
                noTagsView: true,
                title: '查看并接单',
            },
            name: 'purchase-sales-order-view',
            path: 'purchase-sales-order-view',
        },
        {
            component: () => import('@/supplier-pages/order-management/contract-management/index.vue'),
            meta: {
                title: '合同管理',
            },
            name: 'contract-management',
            path: 'contract-management',
        },
        {
            component: () => import('@/supplier-pages/order-management/contract-management/detail.vue'),
            meta: {
                activeMenu: '/purchase-pages/purchase-order-management/contract-management',
                hidden: true,
                noTagsView: true,
                title: '合同详情',
            },
            name: 'contract-detail',
            path: 'contract-detail',
        },
        {
            component: () => import('@/purchase-pages/order-management/delivery-address/index.vue'),
            meta: {
                title: '收货地址',
            },
            name: 'delivery-address',
            path: 'delivery-address',
        },
    ],
    component: Layout,
    meta: {
        alwaysShow: true,
        // icon: 'i-clarity:certificate-line',
        title: '订单管理',
    },
    name: 'purchase-order-management',
    path: 'purchase-order-management',
    redirect: '/purchase-pages/purchase-order-management/delivery-address',
}

export default orderManagement
